#ifndef CSVREADER_H
#define CSVREADER_H
#include <QtCore>

class CSVReader
{
		QFile file;
		QChar _delim;
		QStringList _columns;
		QStringList _currentData;
		QStringList splitRow(const QString &data);
		QString _data;
		int _cursor;
	public:
		CSVReader();
		void setDelimiter(QChar delim);
		bool open(const QString &fname);
		bool next();
		bool first();
		QStringList data();
		QStringList columns();
		QString fileName();
		QString createInsert(int start,QString cube_name);
};

#endif
